<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8"/>
	<meta name="baidu-site-verification" content="JdMif0g2tL" />
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
	<title>angular</title>
	<script src="../js/angular.min.js" charset="utf-8"></script>
</head>
<style type="text/css" media="screen">
	*{margin:0;padding: 0;font-size: 16px;}
</style>
<body ng-app="myApp">

<div ng-controller="appCtrl">
	<form name="myform">
		<div>
			<label>用户名</label>
			<input type="text" name="username" ng-model="uname" placeholder="请输入手机号" required>
			<span ng-show="myform.username.$invalid">用户名必填</span>
		</div>
		<div>
			<label>密码：</label>
			<input type="password" name="password" ng-model="upassword" placeholder="请输入密码">
			<span ng-show="myform.username.$invalid">用户密码必填</span>
		</div>
		<div>
			<button ng-click="submit();">提交</button>
		</div>
	</form>
</div>	

<script type="text/javascript">
	var app =angular.module('myApp', []);
	app.controller('appCtrl', ['$scope', function($scope){
		$scope.submit=function(){
			console.log($scope)
		};		
	}])
</script>
<script type="text/javascript">
	document.getElementsByTagName('html')[0].style.fontSize=window.screen.width/10+'px';
</script>
</body>
</html>
<!--应该 6.6-->